from typing import Annotated
from pydantic import BaseModel, Field, WithJsonSchema


class Model(BaseModel):
    name: Annotated[str, Field(strict=True), WithJsonSchema({'extra': 'data'})]



m = Model(name="example")

print(m.name.upper())


print(m.model_json_schema())

print(m.model_dump_json())


print(m.model_dump())